package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbSchoolyard;
import com.shenmazong.servereduresume.service.TbSchoolyardService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("schoolyard")
public class TbSchoolyardController {
    @Autowired
    private TbSchoolyardService tbSchoolyardService;
    @PostMapping("findByInformationId")
    public ResultResponse findByInformationId(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSchoolyardService.findByInformationId(batchChooseIdVo);
    }
    @PostMapping("saveOrUpdateSchoolyard")
    public ResultResponse saveOrUpdateSchoolyard(@RequestBody TbSchoolyard tbSchoolyard){
        return tbSchoolyardService.saveOrUpdateSchoolyard(tbSchoolyard);
    }
    @PostMapping("deleteSchoolyard")
    public ResultResponse deleteSchoolyard(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbSchoolyardService.deleteSchoolyard(batchChooseIdVo);
    }


}
